    BITS 32

    EXTERN _minijavaExit
    EXTERN _printInt
    EXTERN _newObject
    EXTERN _newArray
    EXTERN _assertPtr
    EXTERN _boundCheck

    GLOBAL _minijava_main_1

    SECTION .data
vtable_QS:
    dd ??Start$QS
    dd ??Sort$QS
    dd ??Print$QS
    dd ??Init$QS

SECTION .text


_minijava_main_1:
    push ebp
    mov ebp, esp
    sub esp, 0
L31:
    mov ecx, vtable_QS
    push ecx
    mov ecx,12
    push ecx
    call _newObject
    pop ecx
    pop ecx
    mov ecx, eax
    mov eax,3
    push eax
    push ecx
    call _assertPtr
    pop ecx
    pop eax
    mov edx,10
    push edx
    push ecx
    mov eax, 0
    shl eax, 2
    add ecx,0
    add eax,[ecx]
    mov eax, [eax]
    call eax
    pop ecx
    pop edx
    push eax
    call _printInt
    pop eax
    mov eax,0
    push eax
    call _minijavaExit
    pop eax
    jmp L30
L30:
    
    add esp, 0
    pop ebp
    ret
    ; end of _minijava_main_1

??Start$QS:
    push ebp
    mov ebp, esp
    sub esp, 4
L33:
    mov ecx,ebp
    sub ecx,4
    mov [ecx], edi
    mov edi,0
    mov edi,ebp
    add edi,8
    mov ecx, [edi]
    mov edi,20
    push edi
    push ecx
    call _assertPtr
    pop ecx
    pop edi
    mov edi,ebp
    add edi,12
    mov edi, [edi]
    push edi
    push ecx
    mov edi, 3
    shl edi, 2
    add ecx,0
    add edi,[ecx]
    mov edi, [edi]
    call edi
    pop ecx
    pop edi
    mov edi, eax
    mov edi,ebp
    add edi,8
    mov edi, [edi]
    mov ecx,21
    push ecx
    push edi
    call _assertPtr
    pop edi
    pop ecx
    push edi
    mov ecx, 2
    shl ecx, 2
    add edi,0
    add ecx,[edi]
    mov edi, [ecx]
    call edi
    pop edi
    mov edi, eax
    mov edi,9999
    push edi
    call _printInt
    pop edi
    mov edi, 2
    shl edi, 2
    mov ecx,ebp
    add ecx,8
    add edi,[ecx]
    mov edi, [edi]
    sub edi,1
    mov ecx,ebp
    add ecx,8
    mov ecx, [ecx]
    mov edx,24
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    push edi
    mov edi,0
    push edi
    push ecx
    mov edi, 1
    shl edi, 2
    add ecx,0
    add edi,[ecx]
    mov edi, [edi]
    call edi
    pop ecx
    pop edi
    pop edi
    mov edi, eax
    mov edi,ebp
    add edi,8
    mov edi, [edi]
    mov ecx,25
    push ecx
    push edi
    call _assertPtr
    pop edi
    pop ecx
    push edi
    mov ecx, 2
    shl ecx, 2
    add edi,0
    add ecx,[edi]
    mov edi, [ecx]
    call edi
    pop edi
    mov edi, eax
    mov eax,0
    mov edi,ebp
    sub edi,4
    mov edi, [edi]
    jmp L32
L32:
    
    add esp, 4
    pop ebp
    ret
    ; end of ??Start$QS

??Sort$QS:
    push ebp
    mov ebp, esp
    sub esp, 28
L35:
    mov ecx,ebp
    sub ecx,24
    mov [ecx], esi
    mov esi,ebp
    sub esi,28
    mov [esi], edi
    mov ecx,0
    mov ecx,0
    mov ecx,0
    mov eax,0
    mov esi,ebp
    sub esi,20
    mov [esi], eax
    mov eax,0
    mov esi,0
    mov edi,0
    mov esi,ebp
    sub esi,16
    mov [esi], edi
    mov eax,0
    mov esi,ebp
    sub esi,12
    mov [esi], eax
    mov eax,0
    mov esi,ebp
    sub esi,20
    mov [esi], eax
    mov esi,ebp
    add esi,12
    mov ecx, [esi]
    mov esi,ebp
    add esi,16
    mov esi, [esi]
    cmp ecx, esi
    jl  L0
L1:
    mov eax,0
L2:
    mov eax,0
    mov esi,ebp
    sub esi,24
    mov esi, [esi]
    mov ecx,ebp
    sub ecx,28
    mov edi, [ecx]
    jmp L34
L0:
    mov esi, 1
    shl esi, 2
    mov ecx,ebp
    add ecx,8
    add esi,[ecx]
    mov ecx, [esi]
    mov esi,42
    push esi
    push ecx
    call _assertPtr
    pop ecx
    pop esi
    mov esi,ebp
    add esi,16
    mov esi, [esi]
    mov eax,42
    push eax
    push esi
    push ecx
    call _boundCheck
    pop ecx
    pop esi
    pop eax
    add esi,1
    shl esi, 2
    add esi,ecx
    mov eax, [esi]
    mov esi,ebp
    sub esi,12
    mov [esi], eax
    mov esi,ebp
    add esi,12
    mov edi, [esi]
    sub edi,1
    mov esi,ebp
    sub esi,16
    mov [esi], edi
    mov esi,ebp
    add esi,16
    mov esi, [esi]
    mov ecx,1
L3:
    mov esp,0
    cmp ecx, esp
    je  L4
L5:
    mov ecx,1
L18:
    mov esp,0
    cmp ecx, esp
    je  L19
L20:
    mov ecx,ebp
    sub ecx,16
    mov edi, [ecx]
    add edi,1
    mov ecx,ebp
    sub ecx,16
    mov [ecx], edi
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    mov ecx, [esp]
    mov eax,50
    push eax
    push ecx
    call _assertPtr
    pop ecx
    pop eax
    mov esp,ebp
    sub esp,16
    mov edi, [esp]
    mov eax,50
    push eax
    push edi
    push ecx
    call _boundCheck
    pop ecx
    pop edi
    pop eax
    add edi,1
    shl edi, 2
    add edi,ecx
    mov ecx, [edi]
    mov esp,ebp
    sub esp,12
    mov eax, [esp]
    cmp ecx, eax
    jl  L24
L25:
    mov ecx,1
L26:
    mov esp,0
    cmp ecx, esp
    je  L22
L21:
    mov ecx,0
L23:
    jmp L18
L24:
    mov ecx,0
    jmp L26
L22:
    mov ecx,1
    jmp L23
L19:
    mov ecx,1
L9:
    mov esp,0
    cmp ecx, esp
    je  L10
L11:
    sub esi,1
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    mov eax, [esp]
    mov ecx,57
    push ecx
    push eax
    call _assertPtr
    pop eax
    pop ecx
    mov ecx, esi
    mov edi,57
    push edi
    push ecx
    push eax
    call _boundCheck
    pop eax
    pop ecx
    pop edi
    add ecx,1
    shl ecx, 2
    add ecx,eax
    mov ecx, [ecx]
    mov esp,ebp
    sub esp,12
    mov eax, [esp]
    cmp eax, ecx
    jl  L15
L16:
    mov ecx,1
L17:
    mov esp,0
    cmp ecx, esp
    je  L13
L12:
    mov ecx,0
L14:
    jmp L9
L15:
    mov ecx,0
    jmp L17
L13:
    mov ecx,1
    jmp L14
L10:
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    mov eax, [esp]
    mov ecx,63
    push ecx
    push eax
    call _assertPtr
    pop eax
    pop ecx
    mov ecx,ebp
    sub ecx,16
    mov edi, [ecx]
    mov ecx,63
    push ecx
    push edi
    push eax
    call _boundCheck
    pop eax
    pop edi
    pop ecx
    add edi,1
    shl edi, 2
    add edi,eax
    mov eax, [edi]
    mov ecx,ebp
    sub ecx,20
    mov [ecx], eax
    mov ecx, 1
    shl ecx, 2
    mov esp,ebp
    add esp,8
    add ecx,[esp]
    mov ecx, [ecx]
    mov eax,64
    push eax
    push ecx
    call _assertPtr
    pop ecx
    pop eax
    mov esp,ebp
    sub esp,16
    mov edi, [esp]
    mov eax,64
    push eax
    push edi
    push ecx
    call _boundCheck
    pop ecx
    pop edi
    pop eax
    mov ecx,ebp
    sub ecx,16
    mov edi, [ecx]
    add edi,1
    shl edi, 2
    mov ecx, 1
    shl ecx, 2
    mov esp,ebp
    add esp,8
    add ecx,[esp]
    add edi,[ecx]
    mov ecx,ebp
    sub ecx,8
    mov [ecx], edi
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    mov eax, [esp]
    mov ecx,64
    push ecx
    push eax
    call _assertPtr
    pop eax
    pop ecx
    mov ecx, esi
    mov edi,64
    push edi
    push ecx
    push eax
    call _boundCheck
    pop eax
    pop ecx
    pop edi
    add ecx,1
    shl ecx, 2
    add ecx,eax
    mov esp, [ecx]
    mov ecx,ebp
    sub ecx,8
    mov edi, [ecx]
    mov [edi], esp
    mov ecx, 1
    shl ecx, 2
    mov esp,ebp
    add esp,8
    add ecx,[esp]
    mov ecx, [ecx]
    mov eax,65
    push eax
    push ecx
    call _assertPtr
    pop ecx
    pop eax
    mov eax, esi
    mov edi,65
    push edi
    push eax
    push ecx
    call _boundCheck
    pop ecx
    pop eax
    pop edi
    mov ecx,esi
    add ecx,1
    shl ecx, 2
    mov eax, 1
    shl eax, 2
    mov esp,ebp
    add esp,8
    add eax,[esp]
    add ecx,[eax]
    mov esp,ebp
    sub esp,20
    mov eax, [esp]
    mov [ecx], eax
    mov ecx,ebp
    sub ecx,16
    mov edi, [ecx]
    add edi,1
    cmp esi, edi
    jl  L6
L7:
    mov ecx,1
L8:
    jmp L3
L6:
    mov ecx,0
    jmp L8
L4:
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    mov eax, [esp]
    mov ecx,70
    push ecx
    push eax
    call _assertPtr
    pop eax
    pop ecx
    mov ecx, esi
    mov edi,70
    push edi
    push ecx
    push eax
    call _boundCheck
    pop eax
    pop ecx
    pop edi
    add esi,1
    shl esi, 2
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    add esi,[esp]
    mov ecx,ebp
    sub ecx,4
    mov [ecx], esi
    mov ecx, 1
    shl ecx, 2
    mov esi,ebp
    add esi,8
    add ecx,[esi]
    mov esi, [ecx]
    mov ecx,70
    push ecx
    push esi
    call _assertPtr
    pop esi
    pop ecx
    mov ecx,ebp
    sub ecx,16
    mov edi, [ecx]
    mov ecx,70
    push ecx
    push edi
    push esi
    call _boundCheck
    pop esi
    pop edi
    pop ecx
    add edi,1
    shl edi, 2
    add edi,esi
    mov ecx, [edi]
    mov esi,ebp
    sub esi,4
    mov esi, [esi]
    mov [esi], ecx
    mov esi, 1
    shl esi, 2
    mov ecx,ebp
    add ecx,8
    add esi,[ecx]
    mov ecx, [esi]
    mov esi,71
    push esi
    push ecx
    call _assertPtr
    pop ecx
    pop esi
    mov esi,ebp
    sub esi,16
    mov edi, [esi]
    mov esi,71
    push esi
    push edi
    push ecx
    call _boundCheck
    pop ecx
    pop edi
    pop esi
    mov esi,ebp
    sub esi,16
    mov edi, [esi]
    add edi,1
    shl edi, 2
    mov ecx, 1
    shl ecx, 2
    mov esi,ebp
    add esi,8
    add ecx,[esi]
    add edi,[ecx]
    mov ecx, 1
    shl ecx, 2
    mov esi,ebp
    add esi,8
    add ecx,[esi]
    mov ecx, [ecx]
    mov esi,71
    push esi
    push ecx
    call _assertPtr
    pop ecx
    pop esi
    mov esi,ebp
    add esi,16
    mov esi, [esi]
    mov eax,71
    push eax
    push esi
    push ecx
    call _boundCheck
    pop ecx
    pop esi
    pop eax
    add esi,1
    shl esi, 2
    add esi,ecx
    mov esi, [esi]
    mov [edi], esi
    mov esi, 1
    shl esi, 2
    mov ecx,ebp
    add ecx,8
    add esi,[ecx]
    mov ecx, [esi]
    mov esi,72
    push esi
    push ecx
    call _assertPtr
    pop ecx
    pop esi
    mov esi,ebp
    add esi,16
    mov esi, [esi]
    mov eax,72
    push eax
    push esi
    push ecx
    call _boundCheck
    pop ecx
    pop esi
    pop eax
    mov ecx,1
    mov esi,ebp
    add esi,16
    add ecx,[esi]
    shl ecx, 2
    mov esp, 1
    shl esp, 2
    mov esi,ebp
    add esi,8
    add esp,[esi]
    add ecx,[esp]
    mov esi,ebp
    sub esi,20
    mov eax, [esi]
    mov [ecx], eax
    mov esi,ebp
    add esi,8
    mov ecx, [esi]
    mov esi,73
    push esi
    push ecx
    call _assertPtr
    pop ecx
    pop esi
    mov esi,ebp
    sub esi,16
    mov edi, [esi]
    sub edi,1
    push edi
    mov esi,ebp
    add esi,12
    mov esi, [esi]
    push esi
    push ecx
    mov esi, 1
    shl esi, 2
    add ecx,0
    add esi,[ecx]
    mov esi, [esi]
    call esi
    pop ecx
    pop esi
    pop edi
    mov esi,ebp
    add esi,8
    mov ecx, [esi]
    mov esi,74
    push esi
    push ecx
    call _assertPtr
    pop ecx
    pop esi
    mov esi,ebp
    add esi,16
    mov esi, [esi]
    push esi
    mov esi,ebp
    sub esi,16
    mov edi, [esi]
    add edi,1
    push edi
    push ecx
    mov esi, 1
    shl esi, 2
    add ecx,0
    add esi,[ecx]
    mov esi, [esi]
    call esi
    pop ecx
    pop edi
    pop esi
    jmp L2
L34:
    
    add esp, 28
    pop ebp
    ret
    ; end of ??Sort$QS

??Print$QS:
    push ebp
    mov ebp, esp
    sub esp, 4
L37:
    mov ecx,0
    mov edx,ebp
    sub edx,4
    mov [edx], ecx
    mov ecx,0
    mov edx,ebp
    sub edx,4
    mov [edx], ecx
L27:
    mov edx, 2
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov edx, [edx]
    mov ecx,ebp
    sub ecx,4
    mov ecx, [ecx]
    cmp ecx, edx
    jl  L29
L28:
    mov eax,0
    jmp L36
L29:
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov edx, [edx]
    mov ecx,86
    push ecx
    push edx
    call _assertPtr
    pop edx
    pop ecx
    mov ecx,ebp
    sub ecx,4
    mov ecx, [ecx]
    mov eax,86
    push eax
    push ecx
    push edx
    call _boundCheck
    pop edx
    pop ecx
    pop eax
    add ecx,1
    shl ecx, 2
    add ecx,edx
    mov ecx, [ecx]
    push ecx
    call _printInt
    pop ecx
    mov ecx,ebp
    sub ecx,4
    mov ecx, [ecx]
    add ecx,1
    mov edx,ebp
    sub edx,4
    mov [edx], ecx
    jmp L27
L36:
    
    add esp, 4
    pop ebp
    ret
    ; end of ??Print$QS

??Init$QS:
    push ebp
    mov ebp, esp
    sub esp, 4
L39:
    mov edx,ebp
    sub edx,4
    mov [edx], ebx
    mov edx,ebp
    add edx,12
    mov ebx, [edx]
    mov ecx, 2
    shl ecx, 2
    mov edx,ebp
    add edx,8
    add ecx,[edx]
    mov [ecx], ebx
    mov ebx, 1
    shl ebx, 2
    mov edx,ebp
    add edx,8
    add ebx,[edx]
    mov edx,ebp
    add edx,12
    mov edx, [edx]
    push edx
    call _newArray
    pop edx
    mov [ebx], eax
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov edx, [edx]
    mov ecx,98
    push ecx
    push edx
    call _assertPtr
    pop edx
    pop ecx
    mov ecx,0
    mov ebx,98
    push ebx
    push ecx
    push edx
    call _boundCheck
    pop edx
    pop ecx
    pop ebx
    mov esp,20
    mov ebx,0
    add ebx,1
    shl ebx, 2
    mov ecx, 1
    shl ecx, 2
    mov edx,ebp
    add edx,8
    add ecx,[edx]
    add ebx,[ecx]
    mov [ebx], esp
    mov ecx, 1
    shl ecx, 2
    mov edx,ebp
    add edx,8
    add ecx,[edx]
    mov ecx, [ecx]
    mov edx,99
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    mov edx,1
    mov ebx,99
    push ebx
    push edx
    push ecx
    call _boundCheck
    pop ecx
    pop edx
    pop ebx
    mov ebx,7
    mov ecx,1
    add ecx,1
    shl ecx, 2
    mov esp, 1
    shl esp, 2
    mov edx,ebp
    add edx,8
    add esp,[edx]
    add ecx,[esp]
    mov [ecx], ebx
    mov ecx, 1
    shl ecx, 2
    mov edx,ebp
    add edx,8
    add ecx,[edx]
    mov ecx, [ecx]
    mov edx,100
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    mov edx,2
    mov ebx,100
    push ebx
    push edx
    push ecx
    call _boundCheck
    pop ecx
    pop edx
    pop ebx
    mov ebx,12
    mov edx,2
    add edx,1
    shl edx, 2
    mov esp, 1
    shl esp, 2
    mov ecx,ebp
    add ecx,8
    add esp,[ecx]
    add edx,[esp]
    mov [edx], ebx
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov edx, [edx]
    mov ecx,101
    push ecx
    push edx
    call _assertPtr
    pop edx
    pop ecx
    mov ecx,3
    mov ebx,101
    push ebx
    push ecx
    push edx
    call _boundCheck
    pop edx
    pop ecx
    pop ebx
    mov ebx,18
    mov ecx,3
    add ecx,1
    shl ecx, 2
    mov edx, 1
    shl edx, 2
    mov esp,ebp
    add esp,8
    add edx,[esp]
    add ecx,[edx]
    mov [ecx], ebx
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov edx, [edx]
    mov ecx,102
    push ecx
    push edx
    call _assertPtr
    pop edx
    pop ecx
    mov ecx,4
    mov ebx,102
    push ebx
    push ecx
    push edx
    call _boundCheck
    pop edx
    pop ecx
    pop ebx
    mov esp,2
    mov ecx,4
    add ecx,1
    shl ecx, 2
    mov ebx, 1
    shl ebx, 2
    mov edx,ebp
    add edx,8
    add ebx,[edx]
    add ecx,[ebx]
    mov [ecx], esp
    mov ecx, 1
    shl ecx, 2
    mov edx,ebp
    add edx,8
    add ecx,[edx]
    mov ecx, [ecx]
    mov edx,103
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    mov edx,5
    mov ebx,103
    push ebx
    push edx
    push ecx
    call _boundCheck
    pop ecx
    pop edx
    pop ebx
    mov ebx,11
    mov edx,5
    add edx,1
    shl edx, 2
    mov ecx, 1
    shl ecx, 2
    mov esp,ebp
    add esp,8
    add ecx,[esp]
    add edx,[ecx]
    mov [edx], ebx
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov ecx, [edx]
    mov edx,104
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    mov edx,6
    mov ebx,104
    push ebx
    push edx
    push ecx
    call _boundCheck
    pop ecx
    pop edx
    pop ebx
    mov ebx,6
    mov ecx,6
    add ecx,1
    shl ecx, 2
    mov edx, 1
    shl edx, 2
    mov esp,ebp
    add esp,8
    add edx,[esp]
    add ecx,[edx]
    mov [ecx], ebx
    mov ecx, 1
    shl ecx, 2
    mov edx,ebp
    add edx,8
    add ecx,[edx]
    mov ecx, [ecx]
    mov edx,105
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    mov edx,7
    mov ebx,105
    push ebx
    push edx
    push ecx
    call _boundCheck
    pop ecx
    pop edx
    pop ebx
    mov ebx,9
    mov ecx,7
    add ecx,1
    shl ecx, 2
    mov edx, 1
    shl edx, 2
    mov esp,ebp
    add esp,8
    add edx,[esp]
    add ecx,[edx]
    mov [ecx], ebx
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov edx, [edx]
    mov ecx,106
    push ecx
    push edx
    call _assertPtr
    pop edx
    pop ecx
    mov ecx,8
    mov ebx,106
    push ebx
    push ecx
    push edx
    call _boundCheck
    pop edx
    pop ecx
    pop ebx
    mov esp,19
    mov ebx,8
    add ebx,1
    shl ebx, 2
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    add ebx,[edx]
    mov [ebx], esp
    mov edx, 1
    shl edx, 2
    mov ecx,ebp
    add ecx,8
    add edx,[ecx]
    mov ecx, [edx]
    mov edx,107
    push edx
    push ecx
    call _assertPtr
    pop ecx
    pop edx
    mov edx,9
    mov ebx,107
    push ebx
    push edx
    push ecx
    call _boundCheck
    pop ecx
    pop edx
    pop ebx
    mov ecx,5
    mov eax,9
    add eax,1
    shl eax, 2
    mov edx, 1
    shl edx, 2
    mov ebx,ebp
    add ebx,8
    add edx,[ebx]
    add eax,[edx]
    mov [eax], ecx
    mov eax,0
    mov edx,ebp
    sub edx,4
    mov ebx, [edx]
    jmp L38
L38:
    
    add esp, 4
    pop ebp
    ret
    ; end of ??Init$QS
